<!DOCTYPE html>
<html lang="en">
<head>
    <title>鲨鱼🦈5号网络基地</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link rel="shortcut icon" href="/images/ed.png">
    <style type="text/css">
        a:link{
            color:gold;
        }
        a:visited{
            color:gold;
        }
    </style>
</head>
<body style="background: black; color: white; text-align: center;">
    <form method="post">
        <p>
            {{ info }}
        </p>
        <p>
            {{ eng }}
        </p>
        <p id="chi"></p>
        <p id="csv_chi"></p>
        <input type="submit" value="Familiar" name="fam" id="fam">
        <input type="submit" value="Unfamiliar" name="unf" id="unf">
    </form>
        <button onclick="show()">show</button>
    <br>
    <a href="../">Back</a>

    <script>
        function show() {
            document.getElementById("chi").innerHTML = "{{ chi }}";
            {% for entry in csv_chi %}
                document.getElementById("csv_chi").innerHTML += "{{ entry }}" + "<br>"
            {% endfor %}
        }

        document.onkeydown = keyDownSearch;
        function keyDownSearch(e) {
            var theEvent = e || window.event;
            var code = theEvent.keyCode || theEvent.which || theEvent.charCode;
            if (code == 13) {
                if(document.getElementById("chi").innerHTML == ""){
                    show();
                }
                else{
                    document.getElementById("fam").click();
                }
                return false;
            }
            if (code == 8) {
                if(document.getElementById("chi").innerHTML == ""){
                    show();
                }
                else{
                    document.getElementById("unf").click();
                }
            }
            return true;
        }
    </script>
</body>
</html>